package com.yidu.hbatsft.action;

import com.yidu.hbatsft.service.AtsPlanItemService;
import com.yidu.privilege.Utils.BaseMessage;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
@RequestMapping("/atsItem")
public class AtsPlanItemController {

    @Resource
    AtsPlanItemService atsPlanItemService;

    @RequestMapping("Delete")
    @ResponseBody
    public BaseMessage updateDelete (Integer itemId){

        BaseMessage bm = new BaseMessage();

        Integer temp = atsPlanItemService.updateDelete(itemId);

        if(temp > 0){
            bm.setState(1);
            bm.setMsg("删除成功");
        }else {
            bm.setState(0);
            bm.setMsg("删除失败");
        }
        return bm;
    }

}
